<HTML>
<HEAD>
<TITLE>JavaScript Source Code 3000:  Password Protection:  Multiple Users Prompt</TITLE>
<META HTTP-EQUIV="JavaScript Source Code 3000" CONTENT = "no-cache">
<META NAME="date" CONTENT="2000-09-09">
<META NAME="channel" CONTENT="Web Developer">
<META NAME="author" CONTENT="JavaScript Source Code 3000">
<META NAME="section" CONTENT="Password Protection">
<META NAME="description" CONTENT="Rather not have one password for access the Members-Only section of your site?  Well, along comes this little JavaScript gem.  You can set up a separate username and password for as many members as you want, and even give each a different page to go to after logging in!  ">

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function LogIn(){
loggedin=false;
username="";
password="";
username=prompt("Username:","");
username=username.toLowerCase();
password=prompt("Password:","");
password=password.toLowerCase();
if (username=="guest" && password=="login") { 
loggedin=true;
window.location="multiple-users-prompt-source.html";
}
if (loggedin==false) {
alert("Invalid login!");
}
}
// End -->
</SCRIPT> 
</HEAD>

<BODY BGCOLOR=#ffffff vlink=#0000ff>

<BR>
<center>
<table width="600" cellpadding="0" cellspacing="10">
<tr>
<td width="468" align="center">

	
</td>
<td width="120" align="center">

	
</td>
</tr>
</table>
<BR>
<BR>
<BASEFONT SIZE=3>
  <FONT SIZE=6>
<B><FONT SIZE="+2" FACE="Helvetica,Arial" ALIGN=RIGHT COLOR="#0000FF">
<b><A HREF="../index.htm" /" TARGET="_top">
Home</A> </b><img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <b><A HREF="index.htm" /passwords/"><font color="#FF0000">Password Protection</font></A> </b>
<img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <FONT COLOR="#006666">Multiple Users Prompt</FONT></b></FONT><BR>
</B><BR>
  </FONT>
<TABLE BORDER=0 WIDTH=500 CELLPADDING=3 CELLSPACING=0>
<tr><td><font FACE=" helvetica,arial,geneva">
<br>
<br>
<!-- Description --><!--content_start-->

This JavaScript is just like the previous Multiple Users one, but doesn't use a table interface to login.  Instead, after clicking the Login! button, the script will ask them for their username and password, and then perform the password-protection.  Very neat!<br><hr>
<br>
<center>
<table bgcolor=#ffe9bf cellpadding=3 border=1>
<tr>
<td colspan=2 align=center><font face="verdana, arial" size="-1">To login:</font></td></tr>
<tr>
<td><font face="verdana, arial" size="-1">Username:</font></td>
<td><font face="verdana, arial" size="-1">guest</font></td>
</tr>
<td><font face="verdana, arial" size="-1">Password:</font></td>
<td><font face="verdana, arial" size="-1">login</font></td>
</tr>
</table>
<br><hr>

</td></tr>
</table>
<!--  Demonstration  -->
<center>
<form><input type=button value="Login!" onClick="LogIn()"></form>
</center>
<P>
<BR>
<P>

	

<P>


</CENTER>